package utils

import "fmt"

// 大写开头 --> public
func Cal(num1 float64, num2 float64, operator byte) float64 {
	switch operator {
	case '+':
		return num1 + num2
	case '-':
		return num1 - num2
	case '*':
		return num1 * num2
	case '/':
		return num1 / num2
	default:
		fmt.Println("输入错误")
	}
	return 0
}
